﻿<UserControl 
	x:Class="EyeOpen.Webcam.Silverlight.MainPage"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	Width="400"
	Height="500">
	<Grid Background="Black">
		<StackPanel Orientation="Vertical">
			<Button
				Click="EnableWebcam" 
				Width="60" 
				Height="30" 
				Content="Start"
				Margin="0 0 0 10"
			    >
				<Button.Template>
					<ControlTemplate TargetType="Button">
						<Border x:Name="Border" Background="Orange">
							<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" />
						</Border>
					</ControlTemplate>
				</Button.Template>
			</Button>
			<Rectangle Width="328" Height="248">
				<Rectangle.Fill>
					<VideoBrush x:Name="display" />
				</Rectangle.Fill>
			</Rectangle>
			<Rectangle Width="328" Height="248">
				<Rectangle.Fill>
					<VideoBrush x:Name="displayRotated" />
				</Rectangle.Fill>
				<Rectangle.OpacityMask>
				<LinearGradientBrush EndPoint="0.506,0.609" StartPoint="0.5,0.161">
					<GradientStop Color="#4C000000" Offset="1"/>
					<GradientStop Color="#00FFFFFF" Offset="0"/>
				</LinearGradientBrush>
			</Rectangle.OpacityMask>
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="-1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform X="0" Y="248"/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
		</StackPanel>
	</Grid>
</UserControl>